/**
 * Progetto PRAISED.
 * 24/gen/2011
 */
package it.uniroma3.dia.praised.core.model;

/**
 * @author Accosta Augusto
 * @author Lopez Elisabetta
 *
 */
public class CandidateProteinName implements Comparable<CandidateProteinName> {

	private ProteinName candidateProtein;
	private Rank rank;
	
	/**
	 * 
	 */
	public CandidateProteinName(ProteinName candidateProtein, Rank rank) {
		this.candidateProtein = candidateProtein;
		this.rank = rank;
	}

	/**
	 * @param candidateProtein the candidateProtein to set
	 */
	public void setCandidateProtein(ProteinName candidateProtein) {
		this.candidateProtein = candidateProtein;
	}

	/**
	 * @return the candidateProtein
	 */
	public ProteinName getCandidateProtein() {
		return this.candidateProtein;
	}

	/**
	 * @param rank the rank to set
	 */
	public void setRank(Rank rank) {
		this.rank = rank;
	}

	/**
	 * @return the rank
	 */
	public Rank getRank() {
		return this.rank;
	}
	
	public String toString() {
		return this.candidateProtein.getFullName() + "\t" + this.rank.toString();
	}

	@Override
	public int compareTo(CandidateProteinName candidate) {
		return this.rank.compareTo(candidate.getRank()); 
	}

}
